package vn.edu.saigontech.ncms.model.system;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.OptimisticLockType;

import vn.edu.saigontech.ncms.model.BaseEntity;

@Entity
@org.hibernate.annotations.Entity(dynamicInsert = true, dynamicUpdate = true, optimisticLock = OptimisticLockType.ALL)
@Table(name = "ncms_day_off")
@SuppressWarnings("serial")
public class DayOff extends BaseEntity {

	@Column(name = "date", unique = true, nullable = false)
	@Temporal(TemporalType.DATE)
	private Date date;

	@Column(name = "end_date", unique = true, nullable = false)
	@Temporal(TemporalType.DATE)
	private Date endDate;

	@Column(name = "comment", length = 4000)
	private String comment;

	@Column(name = "yearly_repeat")
	private boolean yearlyRepeat;
	
	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	public String getComment() {
		return comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}

	public boolean isYearlyRepeat() {
		return yearlyRepeat;
	}

	public void setYearlyRepeat(boolean yearlyRepeat) {
		this.yearlyRepeat = yearlyRepeat;
	}
}